import useApiFetch from '~/hooks/useApiFetch';

// 1 检查卡密
export const queryCheckCard = (cardCode: string) => {
  return useApiFetch<ResOptions<boolean>>(`/card/check/${cardCode}`, {
    method: 'GET',
  });
};

// 2 兑换卡密
export const queryRedeemCard = (cardCode: string) => {
  return useApiFetch<void>(`/card/${cardCode}`, {
    method: 'POST',
  });
};
